package com.xyzwps.server.paimon.model.table

import com.xyzwps.server.paimon.model.entity.UserSession
import org.jetbrains.exposed.v1.core.dao.id.LongIdTable
import org.jetbrains.exposed.v1.datetime.CurrentTimestamp
import org.jetbrains.exposed.v1.datetime.timestamp

object UserSessionTable : LongIdTable("user_session") {
    val token = varchar("token", UserSession.TOKEN_MAX_LENGTH).uniqueIndex("uk_token")
    val userId = long("user_id")
    val createdAt = timestamp("created_at").defaultExpression(CurrentTimestamp)
    val expireTime = timestamp("expire_time")
}